table2 <- data.frame(CACE = rep(NA, 6), 
                     SE = rep(NA, 6),  
                     P = rep(NA, 6),
                     q025 = rep(NA, 6),  
                     q975 = rep(NA, 6),  
                     N = rep(NA, 6))
table2[1, ] <- summary(CACE_S1_path)
table2[2, ] <- summary(CACE_S1_immg)
table2[3, ] <- summary(CACE_S1_trus)
table2[4, ] <- summary(CACE_S1_appr)
table2[5, ] <- summary(CACE_S1_vint)
table2[6, ] <- summary(CACE_S1_actv)

Est_Null_SD <- c(
  sd(d1$path.to.citizenship.baseline.01, na.rm = TRUE),
  sd(d1$legal.immigration.baseline.01, na.rm = TRUE),
  sd(d1$trust.baseline.01, na.rm = TRUE),
  sd(d1$approval.baseline.01, na.rm = TRUE),
  sd(d1$vote.baseline.01, na.rm = TRUE),
  sd(d1$vote.november.01[d1$assigned.to.session == 0], na.rm = TRUE))
table2$d <- round(table2$CACE / Est_Null_SD, 3)

table3 <- data.frame(CACE = rep(NA, 6), 
                     SE = rep(NA, 6),  
                     P = rep(NA, 6),
                     q025 = rep(NA, 6),  
                     q975 = rep(NA, 6),  
                     N = rep(NA, 6))
table3[1, ] <- summary(CACE_S2_wate)
table3[2, ] <- summary(CACE_S2_clos)
table3[3, ] <- summary(CACE_S2_trus)
table3[4, ] <- summary(CACE_S2_appr)
table3[5, ] <- summary(CACE_S2_vint)
table3[6, ] <- summary(CACE_S2_actv)

Est_Null_SD <- c(
  sd(data$waterboarding.followup.01[data$assigned.to.session == 0], na.rm = TRUE),
  sd(data$guantanamo.followup.01[data$assigned.to.session == 0], na.rm = TRUE),
  sd(data$trust.baseline.01, na.rm = TRUE),
  sd(data$approval.baseline.01, na.rm = TRUE),
  sd(data$vote.baseline.01, na.rm = TRUE),
  sd(data$vote.november.01[d1$assigned.to.session == 0], na.rm = TRUE))
table3$d <- round(table3$CACE / Est_Null_SD, 3)

cat('\n\nTable 2\n')
rownames(table2) <- c('Path to Citizenship', 'Legal Immigration', 'Trust', 
  'Approval', 'Vote Intent', 'Actual Vote')
print(table2[, -(4:5)])

cat('\n\nTable 3\n')
rownames(table3) <- c('Waterboarding', 'Guantanamo', 'Trust', 
  'Approval', 'Vote Intent', 'Actual Vote')
print(table3[, -(4:5)])

cat('\n\nTable 4\n')
print(table4, digits = 3)

cat('\n\nTable 5\n')
print(table5, digits = 3)


